package com.liwalla.domain;

import javax.persistence.Entity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
import org.springframework.roo.addon.entity.RooEntity;
import java.util.Date;
import com.liwalla.domain.Kid;
import javax.validation.constraints.NotNull;
import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;
import java.math.BigDecimal;
import javax.validation.constraints.Digits;

@Entity
@RooJavaBean
@RooToString
@RooEntity(identifierField = "date", identifierType = Date.class)
public class Growth {

    @NotNull
    @ManyToOne(targetEntity = Kid.class)
    @JoinColumn
    private Kid kid;

    @Digits(integer = 5, fraction = 2)
    private BigDecimal weight;

    @Digits(integer = 5, fraction = 2)
    private BigDecimal height;

    private String comment;
}
